<%--
  Created by IntelliJ IDEA.
  User: 黑白客
  Date: 2019/6/1
  Time: 17:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8"
         language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <h1>页面重定向</h1>

    <%
    //从定向到新地址
        String site = new String("http://www.baidu.com");
        response.setStatus(response.SC_MOVED_TEMPORARILY);
        response.setHeader("Location",site);
    %>
</body>
</html>
